﻿//江苏省厅

//电子图
define([
    "dojo/_base/declare"
    , "esri/layers/TiledMapServiceLayer"
    , "esri/SpatialReference"
    , "esri/geometry/Extent"
    , "esri/layers/TileInfo"
], function (declare
    , TiledMapServiceLayer
    , SpatialReference
    , Extent
    , TileInfo) {
    var Js_vec_c = declare([TiledMapServiceLayer], {
        constructor: function () {
            this.spatialReference = new SpatialReference({wkid: 4490});
            this.initialExtent = (this.fullExtent = new Extent(114.48544902404905, 30.583743925853753, 125.68051764639667, 36.36334458756019,
                this.spatialReference));
            this.tileInfo = new TileInfo({
                "rows": 256,
                "cols": 256,
                "compressionQuality": 0,
                "origin": {
                    "x": -180,
                    "y": 90
                },
                "spatialReference": {
                    "wkid": 4490
                },
                "lods": [
                    // {"level": 0, "resolution": 0.17578125327894775, "scale": 7.38743996427087E7}
                    // , {"level": 1, "resolution": 0.08789062663947399, "scale": 3.69371998213544E7}
                    // , {"level": 2, "resolution": 0.043945313319736994, "scale": 1.84685999106772E7}
                    // , {"level": 3, "resolution": 0.021972656659868472, "scale": 9234299.95533859}
                    // , {"level": 4, "resolution": 0.010986328329934226, "scale": 4617149.97766929}
                    {"level": 5, "resolution": 0.005493164164967124, "scale": 2308574.98883465}
                    , {"level": 6, "resolution": 0.0027465820824835504, "scale": 1154287.49441732}
                    , {"level": 7, "resolution": 0.0013732910412417797, "scale": 577143.747208662}
                    , {"level": 8, "resolution": 6.866455206208899E-4, "scale": 288571.873604331}
                    , {"level": 9, "resolution": 3.433227603104438E-4, "scale": 144285.936802165}
                    , {"level": 10, "resolution": 1.716613801552224E-4, "scale": 72142.9684010827}
                    , {"level": 11, "resolution": 8.583069007761132E-5, "scale": 36071.4842005414}
                    , {"level": 12, "resolution": 4.291534503880566E-5, "scale": 18035.7421002707}
                    , {"level": 13, "resolution": 2.1457672519402802E-5, "scale": 9017.87105013534}
                    , {"level": 14, "resolution": 1.0728836259701401E-5, "scale": 4508.93552506767}
                ]
            });
            this.loaded = true;
            this.onLoad(this);
        },
        getTileUrl: function (level, row, col) {
            return `http://218.94.6.92:6080/arcgis/rest/services/jssl_vector_map/MapServer/tile/${level}/${row}/${col}`;
        }
    });
    return Js_vec_c;
});